<div class="popup_body">
	<a href="<?php echo Yii::app()->createUrl('albums/photoEvent', array('id'=>$prev->id));?>" class="prev"><span></span></a>
	<a href="<?php echo Yii::app()->createUrl('albums/photoEvent', array('id'=>$next->id));?>" class="next"><span></span></a>
	<div class="popup_head">
		<a href="<?php echo Yii::app()->createUrl('albums/photoEvent', array('id'=>$data->id));?>"><?php echo $pos;?></a>
		<div class="popup_action">
			<div class="popup_action_link l7" id="popup_close"></div>
		</div>
	</div>
	<div class="popup_content">
		<?php echo $this->material_image($data->id, $data->name, '820', 'events/'.$_GET['event'].'/'.$data->album->id); ?>
	</div>
	<div class="popup_data">
		<div class="filter_r">
			<?php if($data->user){ ?>
				<div class="popup_data_u">
					<p>Отправитель</p>
					<p><a href="<?php echo Yii::app()->createUrl('profile/index', array('id'=>$data->user_id));?>"><?php echo $data->user->full_name;?></a></p>
				</div>
			<?php } ?>
			<?php if($data->album_id){ ?>
				<div class="popup_data_u">
					<p>Альбом</p>
					<p><a href="<?php echo Yii::app()->createUrl('albums/view', array('id'=>$data->album_id));?>"><?php echo $data->album->name;?></a></p>
				</div>
			<?php } ?>
			<div class="popup_data_a">
				<?php if($data->album->user_id==Yii::app()->user->id):?> 
					<p><a href="<?php echo Yii::app()->createUrl('albums/updatephoto', array('id'=>$data->id, 'event'=>$_GET['event']));?>">Редактировать<span class="popup_data_a_icon i7"></span></a></p>
					<p><a class="removeLink" href="<?php echo Yii::app()->createUrl('albums/deletephoto', array('id'=>$data->id, 'event'=>$_GET['event']));?>">Удалить<span class="popup_data_a_icon i9"></span></a></p>
				<?php endif; ?>
			</div>
		</div>
		<div class="filter_l">
			<div class="u_buzz_comment_link">
				<p class="u_buzz_comment_date">Добавлена <?php echo Yii::app()->dateFormatter->formatDateTime($data->crdate, 'long', 'short');?></p>
				<?php $this->renderPartial('_likes',array(
					'photo_id' => $data->id,
					'countLikes' => $data->countLikes,
					'likes'	=> $data->likes,
				)); ?>
			</div>
			<div class="commentList">
				<?php $this->renderPartial('_commentList',array(
					'comments' => $data->comments,
					'countComments' => $data->countComments
				)); ?>
				<form action="<?php echo Yii::app()->createAbsoluteUrl('albums/insertcomment', array('id'=>$_GET['id'], 'parent_id'=>'0')); ?>" id="buzz_message" class="new_comment_form">
					<div class="flds_border">
						<div class="flds_border_inside">
							<textarea name="text" class="new_comment_text">Ваше сообщение</textarea>
							<input type="hidden" name="parent_id" class="new_comment_parent_id" value="0" />
						</div>
					</div>
					<div class="buzz_action">
						<div class="buzz_btn btn">
							<input type="button" value="Написать" class="new_comment_button" />
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>